package com.lvtu.monitor.dao.exmatch.po;

import java.io.Serializable;


/**
 * @Title: ExPattern.java
 * @Package com.lvtu.monitor.dao.exmatch.po
 * @Description: TODO
 * @author dengcheng
 * @date 2015-5-21 下午3:35:00
 * @version V1.0.0
 */
public class ExPattern implements Serializable {

	private static final long serialVersionUID = -6477278088465721754L;

	public static final String RULE_SEPERATOR = ":::"; 

	private String _id;

	/**
	 * 监控报警规则
	 * 格式举例:(method like api.com:::channel eq ANDROID:::exception like java.lang.ArithmeticException)
	 */
	private String pattern;

	/**
	 * 规则名称
	 */
	private String patternName;

	private String type;

	/**
	 * 发送的邮箱(多个以,分隔)
	 */
	private String email;

	/**
	 * 发送的手机号(多个以,分隔)
	 */
	private String mobile;

	/**
	 * 间隔时间(分钟)
	 */
	private int intervalMinutes;
	
	/**
	 * 上次运行时间
	 */
	private Long lastRunTime;
	
	/**
	 * 是否有效
	 */
	private boolean valid = true;
	
	/** 
	* 规则匹配类型 
	*/
	public enum MatchType {
		eq,		//精确匹配
		like	//模糊匹配
	}

	public String getPattern() {
		return pattern;
	}

	public String getPatternName() {
		return patternName;
	}

	public void setPattern(String pattern) {
		this.pattern = pattern;
	}

	public void setPatternName(String patternName) {
		this.patternName = patternName;
	}

	public String getType() {
		return type;
	}

	public String getEmail() {
		return email;
	}

	public String getMobile() {
		return mobile;
	}

	public void setType(String type) {
		this.type = type;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String get_id() {
		return _id;
	}

	public void set_id(String _id) {
		this._id = _id;
	}

	public int getIntervalMinutes() {
		return intervalMinutes;
	}

	public void setIntervalMinutes(int intervalMinutes) {
		this.intervalMinutes = intervalMinutes;
	}

	public Long getLastRunTime() {
		return lastRunTime;
	}

	public void setLastRunTime(Long lastRunTime) {
		this.lastRunTime = lastRunTime;
	}

	public boolean isValid() {
		return valid;
	}

	public void setValid(boolean valid) {
		this.valid = valid;
	}

}
